﻿<UserControl x:Class="DiamondDash.Views.GameScoreView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    Height="56" Width="239">
	<UserControl.Resources>
		<Storyboard x:Name="StoryboardScoreChange">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
    
    <Grid x:Name="LayoutRoot">
    	<Image Source="/Images/GameScore.png" Stretch="Fill"/>
    	<Image x:Name="image" Source="/Images/GameScoreChange.png" Stretch="Fill" Opacity="0"/>
    	<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="{Binding Text, ElementName=txtScore}" VerticalAlignment="Center" FontSize="32" FontFamily="Segoe WP Black" Margin="0,0,0,5" Foreground="Black" RenderTransformOrigin="0.5,0.5">
    		<TextBlock.RenderTransform>
    			<CompositeTransform TranslateX="3" TranslateY="2"/>
    		</TextBlock.RenderTransform>
    	</TextBlock>
    	<TextBlock x:Name="txtScore" HorizontalAlignment="Center" TextWrapping="Wrap" Text="0" VerticalAlignment="Center" FontSize="32" FontFamily="Segoe WP Black" Margin="0,0,0,5" Foreground="White"/>
    </Grid>
</UserControl>